Expert system of machine tool equipped with NC unit

ABSTRACT

Expert knowledge regarding investigation of the causes of various failures, and knowledge for extracting DI/DO information (IOD), which is exchanged by an NC unit (11) and a machine tool (13), as well as information (ITD) internally of the NC unit, is stored in a knowledge base (IB). When the contents of a failure are entered from an alarm detector (11g) upon occurrence of the failure, a reasoning mechanism (ADPR) uses the expert knowledge conforming to the failure to automatically extract the DI/DO information and information internally of the NC unit (IOD, ITB), ascertains actually occurring phenomena based on this information, recognizes the cause of the failure from these pheonomena, and displays the cause of the failure and a method of dealing with it.

DESCRIPTION

1. Technical Field

This invention relates to an expert system of a machine tool equippedwith an NC unit and, more particularly, to an expert system fordiagnosing failure of an NC unit or machine tool.

2. Background Art

In a machine tool equipped with an NC unit, the NC unit and machine toolundergo various alarm checks and self-diagnoses depending upon therespective category. In the NC unit, for example, various checks areperformed, such as determining whether a machining command tape containsan error or whether a servo system is abnormal. If an anomaly occurs, analarm is generated to so inform the operator.

In the machine tool also a number of checks are performed regarding themachine. For example, an axis-movement interlock is provided on the NCunit side in such a manner that an axis will not move if a spindle isnot rotating at the start of cutting, and a lamp is lit to inform theoperator of a malfunction.

Generally, when an alarm is generated, the operator is informed only ofthe contents of the alarm and not about its cause nor what measures totake. This means that the operator must consult a manual to determinethe cause of the alarm and how to deal with it. However, since severalconceivable causes of an alarm may be described in the manual, there aremany cases in which the operator cannot determine the cause of a failureand its remedy in a simple and accurate manner.

By way of example, when the amount of offset of a servo system becomesexcessive and a servo system alarm is issued during movement along anaxis, all that is done is to inform the operator of an alarm by themessage "ALARM OF EXCESSIVE SERVO SYSTEM OFFSET", so that the operatoris left almost totally uninformed of the cause of the alarm. In otherwords, an alarm as used in the prior art generally does nothing morethan inform the operator that the machine will be damaged and thatsubsequent processing will not be able to continue unless a check ismade. Thus, the alarm is merely a precaution and gives almost noconsideration to a rapid recovery from a failure.

As a consequence of the foregoing, downtime of a machine tool equippedwith an NC unit is prolonged and the efficiency of the machiningoperation declines.

In a case where a number of causes of one alarm are conceivable, itwould be possible to deal with a malfunction in an extremely timelyfashion if it were possible to automatically deduce the cause of themalfunction based on a knowledge source (which refers to a collection ofknowledge regarding a single phenomenon) for an alarm when the alarm isgenerated.

Accordingly, an object of the present invention is to provide an expertsystem of a machine tool equipped with an NC unit, in which an operatoris rapidly informed of the cause of a failure when the failure occurs,thereby making it possible to minimize downtime. Specifically, theinvention provides an expert system of a machine tool equipped with anNC unit wherein when an "EXCESSIVE SERVO SYSTEM OFFSET ALARM" isgenerated, by way of example, the operator is rapidly informed of thename of the alarm and the cause thereof, such as whether the alarm isdue to a set value error in a parameter, a faulty servomotor or a faultydetector.

Another object of the present invention is to provide an expert systemof a machine tool equipped with an NC unit, in which the cause of afailure is automatically investigated when the failure occurs and theoperator is informed of the cause.

DISCLOSURE OF THE INVENTION

An expert system of a machine tool equipped with an NC unit inaccordance with the present invention is provided with a knowledge basestoring expert knowledge regarding investigation of the causes ofvarious failures, and a reasoning mechanism for deducing the cause of afailure based on the expert knowledge stored in the knowledge base,wherein the knowledge base section further stores knowledge forextracting digital input/output information, which is exchanged by theNC unit and machine tool, as well as information internally of the NCunit, with the causes of failures in the NC unit and machine tool beinginvestigated using the information automatically extracted when afailure occurs.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a machine tool equipped with an NC unitwhich includes an expert system according to the present invention;

FIGS. 2 through 5 are examples of conversational screens for diagnosingfailures by the expert system, in which FIG. 2 is an example of aconversational display for inputting the details of a failure, FIGS. 3and 4 are examples of conversational screens for inputting phenomena,and FIG. 5 is an example of a display showing the investigated cause ofa failure;

FIG. 6 is a flowchart of failure diagnosis processing by a reasoningmechanism which investigates the cause of a failure using the details ofa failure and phenomena entered conversationally; and

FIG. 7 is a flowchart of the processing of a reasoning mechanism whichinvestigates the cause of a failure upon automatically recognizing thedetails of a failure and phoneomena.

BEST MODE FOR CARRYING OUT THE INVENTION

FIG. 1 is a block diagram of a machine tool equipped with an NC unitwhich includes an expert system according to the present invention.

Numeral 11 denotes an NC unit (numerical control unit), 12 a PMC unit(programmable machine controller), and 13 a machine tool.

In the numerical control unit 11, numeral 11a denotes a ROM for storinga control program NCPR for numerical control and a control program(reasoning mechanism) ADPR for deducing the cause of a failure. Numeral11b denotes a non-volatile memory (e.g., an IC memory backed up by abattery, or a hard disk) having a storage area NCP for storing variousNC tapes (NC program data), a storage area PRM for storing parameters,and a knowledge base section IB which stores expert knowledge regardinginvestigations of the causes of various failures and the methods ofdealing with these failures, and knowledge for judging phenomenafollowing the reading of various information (this knowledge will bedescribed below). Numerical 11c denotes a volatile memory (RAM) forstoring NC data, parameters and the like read from the non-volatilememory 11b, as well as the internal status of the NC unit (informationinternally of the NC unit) ITD and various information IOD exchanged bythe NC unit and the machine tool. Numeral 11d denotes a processor (CPU)for executing numerical control processing and processing for diagnosingthe cause of a failure in accordance with the control program, 11e aninput/output signal link section for performing an exchange of DI/DO(digital input/output) signals with the PMC unit 12, which executessequence control, and 11f a man/machine interface constituted by acomputer, not shown. The latter has a display unit CRT, which serves asconversational input means, a ten-key pad TKY, and function keys FKY.The man/machine interface converses with the reasoning mechanism when

(i) expert knowledge is inputted to the knowledge base IB, deleted ormodified, and

(ii) failure phenomena are entered at the time of failure diagnosis, orthe cause of a failure is taught.

Numeral 11g denotes an alarm sensor for sensing, and identifying thecategory of, various alarms on the NC unit side, such as an NC tapeerror, excessive servo system offset and operating error. The alarmsensor also refers to a DI signal (digital input signal) sent by the PMCunit 12 to sense, and identify the category of, abnormality and failurealarms generated on the machine side, such as shaft interlock. Numeral11h denotes an axis controller, which includes a pulse distributingcircuit and a servomotor circuit, for each controlled axis.

In the PMC unit 12, numeral 12a represents a inut/output signal link forperforming a DI/DO data exchange with the NC unit, and 12b acomputerized sequential processor for executing processing in accordancewith the sequence program. The sequence processor executes predeterminedsequence processing based on signals from the NC unit 11 and machinetool 13 and outputs the results of processing to the NC unit and machinetool. The latest DI signals which enter from the NC unit 11 and machinetool 13 and the latest DO signals outputted to the NC unit and machinetool are stored in an internal memory 12c of the sequential processor12b.

A failure diagnosing expert system is composed of the reasoning controlprogram stored in ROM 11a, the knowledge base IB and the man-machineinterface 11f serving as the conversational input means. The expertsystem referred to here is a system in which the knowledge possessed byan expert is stored in a computer and processes similar to the judgingand reasoning processes performed by an expert based on this knowledgeare implemented by the computer, whereby information desired to beobtained by a user is provided by the system acting in place of theexpert.

Described hereinbelow will be a case in which the cause of a failure isinvestigated while a conversation is had with the reasoning mechanismADPR, and a case in which the cause of a failure is investigatedautomatically. The description will be rendered taking as an example adiagnosis for a failure "MACHINE DOES NOT OPERATE EVEN IF MANUAL HANDLEFEED IS APPLIED". It will be assumed that there are just three possiblecauses of this failure, namely:

Cause 1: the operation mode switch is not in the manual handle feedposition;

Cause 2: a machine lock switch is on; and

Cause 3: pulses are not generated by a manual pulse generator because ofa malfunction in the pulse generator itself or in a cable.

(a) When cause of a failure is investigated conversationally

In order to specify which of the abovementioned three causes of failureis the true cause, the expert knowledge (know-how) for inquiring intothe cause is stored beforehand in the knowledge base IB. For example,the following rules having the format

"IF--THEN--"

and referred to as "production rules" are stored as expert knowledge inthe knowledge base IB in a data format readily processed by computer:

Rule 1

IF "neither position display nor machine operate" and "LED on NC unitprinted circuit board lights when manual pulse generator is turned",

THEN "Cause 1".

Rule 2

IF "position display does not operate but machine does",

THEN "Cause 2".

Rule 3

IF "neither position display nor machine operate" and "LED on NC unitprinted circuit board does not light when manual pulse generator isturned",

THEN "Cause 3".

When, under these conditions, the machine does not operate even whenmanual handle feed is applied, the operator presses a predeterminedfunction key on the man-machine interface 11f to start failure diagnosisof the expert system.

In response, all of the preconceived failures are displayed on the CRT,as shown in FIG. 2. Accordingly, the number corresponding to the failurepresently occurring is entered from the ten-key pad TKY. In thisexample, the numerical value "1" is entered from the ten-key pad TKY toinput the failure "MACHINE DOES NOT OPERATE EVEN IF MANUAL HANDLE FEEDIS APPLIED".

In response to the entry of the failure, the reasoning mechanismoperates and attempts to inquire into the cause based on the knowledgebase conforming to the failure. However, as will be understood fromRules 1-3, a check must be performed to determine which rule condition(the condition from "IF" to "THEN") holds in order to discover thecause. This is carried out by prompting the operator. That is, in orderfor the reasoning mechanism ADPR to determine which rule condition issatisfied, prompts regarding the particular phenomenon appear as shownin FIG. 3.

In response, if the operator selects "1. NEITHER POSITION DISPLAY NORMACHINE OPERATE", the reasoning mechanism ADPR deduces that the cause isone of the Causes 1 through 3, after which a prompt regarding adifferent phenomenon appears as shown in FIG. 4.

If the operator now selects "1. LIGHTS", then the condition of Rule 1 issatisfied. Consequently, the reasoning mechanism ADPR judges that thecause of the failure is "Cause 1" and the result of this decision isdisplayed, as shown in FIG. 5.

If the operator selects "2. DOES NOT LIGHT" in response to Question 2 onthe conversional screen of FIG. 4, then this means that the condition ofRule 3 is satisfied. Accordingly, the reasoning mechanism ADPR judgesthat the cause of the failure is "Cause 3", and the result of thisdecision is displayed on the CRT. If "2. POSITION DISPLAY OPERATES BUTMACHINE DOES NOT" is selected in response to Question 1 on theconversational screen of FIG. 3, the reasoning mechanism ADPR judgesfrom Rule 2 that the cause of the failure is "Cause 2" based solely onprompt of Question 1, and the result of this decision is displayed onthe CRT.

FIG. 6 if a flowchart of failure diagnosis processing performed by thereasoning mechanism ADPR. When a failure occurs and investigation of thecause is requested, the reasoning mechanism ADPR displays the details ofall failures on the CRT (step 101) and allows input of the failure thathas actually occurred (step 102).

When failure is entered, the reasoning mechanism ADPR inquires into thephenomena concerning the inputted failure based on the knowledge base IBand allows input of phenomena (step 103).

When a phenomenon is entered, the reasoning mechanism ADPR judges thecause. In other words, the ADPR checks to see if the condition of apredetermined production rule is satisfied (step 104).

If the cause is still not clarified, the program returns to step 103 toallow entry of another phenomenon. If the cause is clarified, the causeand the method of dealing with it are displayed on the CRT (step 105)and processing is ended.

(b) When cause of a failure is investigated automatically

In the foregoing case, the reasoning mechanism ADPR retrieves causessuccessively based on the data entered by the operator in response toprompts, whereby the cause of a failure and the method of dealing withit are eventually obtained. However, an arrangement can be adopted inwhich all of the phenomena in the IF statements of the rules can berecognized automatically to enable the cause of a failure to beinvestigated without using prompts.

Specifically, knowledge which has the ability to extract (i) variousinformation (DI/DO signals) IOD exchanged by the NC unit and machinetool and (ii) NC internal information ITD and, moreover, which utilizesthe information ITD and DI/DO signals to discern which of the phenomenain the IF statements of the rules is actually occurring, is stored inthe knowledge base IB. When an alarm category is sensed by the alarmsensor 11g, the reasoning mechanism ADPR immediately begins operating torecognize the phenomenon necessary for investigating the cause of afailure based on the abovementioned knowledge. Based on the phenomenon,the ADPR eventually investigates the cause of the failure and displaysit on the CRT of the man-machine interface 11f.

The following is an example in which a knowledge base uses the function(arithmetic function) for extracting the DI/DO signals and NC internalinformation IDT. It is assumed that the failure phenomenon is "MACHINEDOES NOT OPERATE EVEN IF MANUAL HANDLE IS TURNED".

Rule 1 IF "GETMODE NEQ HANDLE"

THEN "CAUSE 1"

Rule 2 IF 37 GETDI (MLK) EQ 1"

THEN 37 CAUSE 2"

Rule 3 IF "TESTHANDLE EQ 1"

THEN "CAUSE 3"

Specifically, it is arranged so that a function can be used in theknowledge base, and so that various information (DI/DO signals) IOD,which is exchanged by the machine side and the NC unit, and NC internalinformation ITD are extracted depending upon the function.

The function GETMODE in the above example is a function which extractsand identifies the presently selected operating mode. The phenomenon"OPERATING MODE IS NOT MANUAL HANDLE FEED" is indicated by IF "GETMODENEQ HANDLE". It should be noted that since a predetermined address and apredetermined bit of the RAM 11c are assigned to the handle mode,whether the prevailing mode is the handle mode can be recognized basedon a bit content of "1" or "0". Operation is similar also with regard toextraction of the NC internal information ITD.

GETDI is a function which reads the DI signal (digital input signal).GETDI(MLK) is a function for reading a DI signal MLK, which indicatesmachine lock switch on/off. The phenomenon "MACHINE LOCK IS `1`"(machine lock is in effect) is indicated by IF "GETDI (MLK) EQ 1". Itshould be noted that since a predetermined address and a predeterminedbit of the RAM 11c are assigned to machine lock, whether or not machinelock is in effect can be recognized based on a bit content of "1" or"0". Operation is similar also with regard to the DI/DO information IOD.

TESTHANDLE is a function which tests for malfunction in a manual pulsegenerating circuit (of course, a mechanism must be provided fordiagnosing the malfunction in the manual pulse generating circuit). Thephenomenon "MANUAL PULSE GENERATING CIRCUIT IS MALFUNCTIONING" isindicated by IF "TESTHANDLE EQ 1".

In order to determine the cause of a failure such as breakage orshorting of a cable, the three rules mentioned above are inadequate.Therefore, it is necessary to separately provide a mechanism whichchecks for cable breakage or shorting, provide a function fordiscriminating cable breakage or shorting by operating the mechanism,formulate a rule using this function and store the rule as a knowledgebase.

FIG. 7 is a flowchart of processing performed by the reasoning mechanismADPR in a case where the cause of a failure is investigatedautomatically.

When a failure occurs, the alarm sensor 11g senses the occurrence of thefailure to start the reasoning mechanism ADPR. In response, thereasoning mechanism ADPR reads the failure from the alarm sensor 11g(step 201), implements a function for extracting information in an i-thproduction rule (the initial value of i is 1), which is stored in theknowledge base IB, in accordance with the type of failure, extractspredetermined DI/DO information or NC internal information (step 202)and subsequently recognizes the actually occurring pheonomenon based onthe extracted information (step 203).

Next, a check is made to determine whether the cause of the failure hasbeen clarified from all of the phenomena automatically discriminated sofar (step 204). If the cause has been clarified, the cause and themethod of dealing with it are displayed on the CRT (step 205) anddiagnostic processing is ended. If the cause has not been clarified, theoperation i+1→i is performed and processing from step 202 onward isrepeated with regard to the next i-th production rule to eventuallyrecognize the cause of the failure.

In the foregoing case, it is so arranged that all phenomena in all ofthe IF statements of all rules can be recognized automatically, and sothat the categories of alarm can also be sensed automatically by thealarm sensor. However, it is also possible to adopt an arrangement inwhich only some of the phenomena are automatically recognized, whereinphenomena that cannot be recognized are entered by the operatorconversationally, or wherein categories of alarm are entered by theoperator.

In accordance with the invention as set forth above, the arrangement issuch that knowledge, which has the ability to extract variousinformation exchanged by an NC unit and a machine tool as well asinformation internally of the NC unit, is stored in a knowledge base,and a failure is automatically diagnosed based on informationautomatically extracted by the knowledge. As a result, the cause of afailure is displayed immediately after the failure phenomena are enteredor through a minimum number of prompts. This makes it possible togreatly shorten the downtime of a machine tool equipped with an NC unit.

We claim:
 1. An expert system of a machine tool equipped with an NCunit, characterized by provision of a knowledge base storing expertknowledge regarding investigation of causes of various failures, areasoning mechanism for deducing the cause of a failure based on theexpert knowledge stored in the knowledge base, and conversational meansfor inputting the expert knowledge to the knowledge base, deleting andmodifying the expert knowledge, and for conversing with the reasoningmechanism when failure diagnosis is performed;wherein the knowledge basestores knowledge for extracting digital input/output information, whichis exchanged by the NC unit and the machine tool, as well as informationinternally of the NC unit; the reasoning mechanism discriminating thecauses of failures in the NC unit and machine tool based on saidinformation automatically extracted by said expert knowledge when afailure occurs.
 2. An expert system of a machine tool equipped with anNC unit according to claim 1, characterized in that said expertknowledge includes data indicative of a correlation between severalconceivable causes of a single failure and phenomena which actuallyoccur in respective ones of the said causes.
 3. An expert system of amachine tool equipped with an NC unit according to claim 2,characterized in that the reasoning mechanism discriminates actuallyoccurring phenomena based on said extracted input/output information orinformation internally of the NC unit, and discriminates the cause of afailure based on said phenomena.
 4. An expert system of a machine toolequipped with an NC unit according to claim 3, characterized by havingan alarm detector for discriminating a failure which occurs duringoperation of the machine tool equipped with the NC unit, wherein thereasoning mechanism discriminates the cause of a failure based on expertknowledge conforming to said discriminated failure.
 5. An expert systemof a machine tool equipped with an NC unit according to claim 1,characterized in that the cause of a failure is discriminated uponadding a conversationally inputted phenomenon to said automaticallydiscriminated phenomena.